🌐 Network Devices

πŸ”Œ 1. Modem (Modulator-Demodulator)

image
What it does:

Converts digital signals from a computer into analog signals for transmission over telephone lines and vice versa.

Use:

Used to connect to the Internet over telephone lines (DSL).

Example:

When you use a telephone wire to connect to the Internet, your ISP provides a modem to connect your home network.

πŸ“Ά 2. Router

What it does:
  • Forwards data packets between different networks (like your home network and the Internet)
  • Assigns local IP addresses and provides Network Address Translation (NAT)
Functions:
  • Connects multiple networks
  • Directs traffic based on IP addresses
  • Often includes firewall, DHCP, and wireless access point features
Use:

Used in homes and businesses to connect to the internet and route data to the correct devices.

Routing Algorithms:

Routing algorithms in networking are methods used to determine the best path for data to travel from a source to a destination across a network. Think of it like GPS for your data packetsβ€”choosing which roads (network links) to take to reach the destination efficiently.

1. Purpose of Routing Algorithms:

  • Find optimal paths (shortest or fastest route).
  • Avoid network congestion.
  • Ensure reliability and fault tolerance.
  • Support dynamic changes in network topology.

2. Types of Routing Algorithms:

  • Static Routing:
    • Routes are manually configured by network administrators.
    • Do not change automatically if network topology changes.
    • Simple but not adaptable to failures.
    • Example: Routing table in a small office network.
  • Dynamic Routing:
    • Routes are automatically updated using algorithms.
    • Responds to network failures or congestion.
    • Divided into:
      • Distance Vector Routing: Each router shares its routing table with neighbors. Uses metrics like hop count. Examples: RIP, IGRP. Pros: Simple; Cons: Slow convergence.
      • Link State Routing: Each router maintains a full network map and computes shortest paths using algorithms like Dijkstra. Examples: OSPF, IS-IS. Pros: Fast and accurate; Cons: Requires more memory and CPU.
      • Hybrid Routing: Combines features of distance vector and link state. Example: EIGRP.

3. Metrics Used in Routing:

  • Hop count: Number of routers to the destination.
  • Bandwidth: Link capacity.
  • Delay: Time taken for data to travel.
  • Cost: Abstract value combining multiple factors.
  • Reliability: Likelihood of link failure.

πŸ” 3. Switch

image
What it does:
  • Connects multiple devices within the same network (LAN)
  • Uses MAC addresses to forward data only to the intended device
Use:

Used in LANs to efficiently direct traffic to correct devices.

πŸ”Œ 4. Hub

What it does:

Connects multiple devices in a network and sends incoming data to all connected ports.

Disadvantages:
  • No intelligence – causes unnecessary traffic
  • Slower and less secure than switches
Use:

Outdated, but was used in small networks to connect devices.

Hub Diagram

πŸŒ‰ 5. Bridge

What it does:

Connects two separate LANs and filters traffic between them using MAC addresses.

Use:

Breaks up collision domains to reduce traffic and improve performance.

alternative="Bridge

πŸ“‘ 6. Repeater

What it does:

Regenerates and amplifies signals to extend the range of the network.

Use:

Used in wired or wireless networks when signal is too weak due to distance.

Repeater Diagram

🌐 7. Gateway

What it does:
  • Connects two different networks using different protocols (e.g., TCP/IP ↔ Bluetooth)
  • Translates data formats between two incompatible systems
Use:

Acts as a protocol converter between LAN and Internet, or between different systems.

πŸ”₯ 8. Firewall

What it does:

Monitors and controls incoming and outgoing traffic based on predefined security rules.

Firewall Types Comparison:

Feature Stateless Firewall Stateful Firewall
Memory Doesn't remember past packets Keeps track of connection state
Speed Faster (less processing) Slower (more processing)
Security Basic security More secure – knows connection context
Filtering Based on IP, port, and protocol Based on context and state
Use Case Low-risk or high-speed environments Enterprise networks, modern firewalls

βš–οΈ 9. Load Balancer

What it does:

Distributes network or application traffic across multiple servers to ensure no server is overwhelmed.

Types:
  • Hardware Load Balancer: Physical device
  • Software Load Balancer: Installed on a server or cloud (e.g., NGINX, HAProxy)
Use:

Improves availability, performance, and redundancy.

Load Balancing Algorithms:
  • Round Robin: Each server gets a turn
  • Least Connections: New traffic sent to server with fewest connections
  • IP Hash: Client IP determines the server

πŸ“Š Summary Table

Device OSI Layer Purpose Intelligence
Modem Physical/Data Link Converts analog/digital signals Low
Router Network Routes packets between networks High (IP-based)
Switch Data Link Connects devices in LAN Medium (MAC-based)
Hub Physical Broadcasts data to all ports None
Bridge Data Link Connects two LANs MAC-based filtering
Repeater Physical Boosts signal None
Gateway All Layers Protocol conversion High
Firewall Network Packet filtering Varies (Stateless/Stateful)
Load Balancer Application/Transport Traffic distribution High (Algorithmic)